<template>
  <div class="home">
    <!-- 占位符 -->
    <router-view></router-view>
    <div class="nav">
      <router-link to="/one">首页</router-link>
       <router-link to="/two">购物车</router-link>
    </div>
  </div>
</template>

<script>
// @ is an alias to /src
import HelloWorld from '@/components/HelloWorld.vue'

// 引入解构方法
import {mapGetters,mapState} from 'vuex'
export default {
  // 解构后的数据
  computed: {
    ...mapGetters(["zs"])
  },
}
</script>

<style lang="scss" scoped>
  .home{
    display: flex;
    flex-direction: column;
    .nav{
      width: 100%;
      height: 50px;
      display: flex;
      background: #ccc;
        a{
          text-align: center;
          line-height: 50px;
          flex: 1;
        }
    }
  }
  
</style>